package top.lyunz.fangkeji.tools;

/**
 * ajax工具类
 * 
 * @author 11377
 *
 */
public class SimpleResult {
	private boolean success;
	private Object data;
	private String errCode;
	private String errMsg;
	private String message;
	private int pagenum;

	public SimpleResult() {

	}

	public SimpleResult(boolean success) {
		this.success = success;
	}

	public SimpleResult(Object data) {
		if (data != null) {
			this.success = true;
		} else {
			this.success = false;
		}
		this.data = data;
	}

	public SimpleResult(Object data, int pagenum) {
		if (data != null) {
			this.success = true;
		} else {
			this.success = false;
		}
		this.data = data;
		this.pagenum = pagenum;
	}

	public SimpleResult(String errCode, String errMsg, String message) {
		this.success = false;
		this.errCode = errCode;
		this.errMsg = errMsg;
		this.message = message;
	}

	public boolean isSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	public String getErrCode() {
		return errCode;
	}

	public void setErrCode(String errCode) {
		this.errCode = errCode;
	}

	public String getErrMsg() {
		return errMsg;
	}

	public void setErrMsg(String errMsg) {
		this.errMsg = errMsg;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public int getPagenum() {
		return pagenum;
	}

	public void setPagenum(int pagenum) {
		this.pagenum = pagenum;
	}

}
